Optimal. Leaf size=105 \[ -\frac {\sec ^3(c+d x)}{a^3 d}+\frac {2 \sec ^5(c+d x)}{a^3 d}-\frac {11 \sec ^7(c+d x)}{7 a^3 d}+\frac {4 \sec ^9(c+d x)}{9 a^3 d}-\frac {3 \tan ^7(c+d x)}{7 a^3 d}-\frac {4 \tan ^9(c+d x)}{9 a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 105, normalized size of antiderivative = 1.00, number of steps
used = 14, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {2954, 2952,
2686, 276, 2687, 14, 30} \begin {gather*} -\frac {4 \tan ^9(c+d x)}{9 a^3 d}-\frac {3 \tan ^7(c+d x)}{7 a^3 d}+\frac {4 \sec ^9(c+d x)}{9 a^3 d}-\frac {11 \sec ^7(c+d x)}{7 a^3 d}+\frac {2 \sec ^5(c+d x)}{a^3 d}-\frac {\sec ^3(c+d x)}{a^3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 276
Rule 2686
Rule 2687
Rule 2952
Rule 2954
Rubi steps
\begin {align*} \int \frac {\sin (c+d x) \tan ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx &=\frac {\int \sec ^5(c+d x) (a-a \sin (c+d x))^3 \tan ^5(c+d x) \, dx}{a^6}\\ &=\frac {\int \left (a^3 \sec ^5(c+d x) \tan ^5(c+d x)-3 a^3 \sec ^4(c+d x) \tan ^6(c+d x)+3 a^3 \sec ^3(c+d x) \tan ^7(c+d x)-a^3 \sec ^2(c+d x) \tan ^8(c+d x)\right ) \, dx}{a^6}\\ &=\frac {\int \sec ^5(c+d x) \tan ^5(c+d x) \, dx}{a^3}-\frac {\int \sec ^2(c+d x) \tan ^8(c+d x) \, dx}{a^3}-\frac {3 \int \sec ^4(c+d x) \tan ^6(c+d x) \, dx}{a^3}+\frac {3 \int \sec ^3(c+d x) \tan ^7(c+d x) \, dx}{a^3}\\ &=-\frac {\text {Subst}\left (\int x^8 \, dx,x,\tan (c+d x)\right )}{a^3 d}+\frac {\text {Subst}\left (\int x^4 \left (-1+x^2\right )^2 \, dx,x,\sec (c+d x)\right )}{a^3 d}+\frac {3 \text {Subst}\left (\int x^2 \left (-1+x^2\right )^3 \, dx,x,\sec (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int x^6 \left (1+x^2\right ) \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=-\frac {\tan ^9(c+d x)}{9 a^3 d}+\frac {\text {Subst}\left (\int \left (x^4-2 x^6+x^8\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}+\frac {3 \text {Subst}\left (\int \left (-x^2+3 x^4-3 x^6+x^8\right ) \, dx,x,\sec (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}\left (\int \left (x^6+x^8\right ) \, dx,x,\tan (c+d x)\right )}{a^3 d}\\ &=-\frac {\sec ^3(c+d x)}{a^3 d}+\frac {2 \sec ^5(c+d x)}{a^3 d}-\frac {11 \sec ^7(c+d x)}{7 a^3 d}+\frac {4 \sec ^9(c+d x)}{9 a^3 d}-\frac {3 \tan ^7(c+d x)}{7 a^3 d}-\frac {4 \tan ^9(c+d x)}{9 a^3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.26, size = 185, normalized size = 1.76 \begin {gather*} \frac {-1344+8676 \cos (c+d x)-11232 \cos (2 (c+d x))+482 \cos (3 (c+d x))+4416 \cos (4 (c+d x))-1446 \cos (5 (c+d x))-32 \cos (6 (c+d x))-1152 \sin (c+d x)+6507 \sin (2 (c+d x))-8128 \sin (3 (c+d x))+2892 \sin (4 (c+d x))+192 \sin (5 (c+d x))-241 \sin (6 (c+d x))}{64512 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^3 (a+a \sin (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.39, size = 190, normalized size = 1.81
method | result | size |
risch | \(-\frac {2 i \left (-128 i {\mathrm e}^{3 i \left (d x +c \right )}+75 \,{\mathrm e}^{2 i \left (d x +c \right )}+6 i {\mathrm e}^{i \left (d x +c \right )}-162 \,{\mathrm e}^{4 i \left (d x +c \right )}-1-36 i {\mathrm e}^{5 i \left (d x +c \right )}-42 \,{\mathrm e}^{6 i \left (d x +c \right )}-189 \,{\mathrm e}^{8 i \left (d x +c \right )}+126 i {\mathrm e}^{9 i \left (d x +c \right )}+63 \,{\mathrm e}^{10 i \left (d x +c \right )}\right )}{63 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )^{9} d \,a^{3}}\) | \(143\) |
derivativedivides | \(\frac {-\frac {1}{24 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {8}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}-\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}+\frac {48}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {16}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{a^{3} d}\) | \(190\) |
default | \(\frac {-\frac {1}{24 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {1}{16 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {8}{9 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9}}-\frac {4}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{8}}+\frac {48}{7 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{7}}-\frac {16}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{6}}+\frac {3}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}+\frac {1}{4 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{4}}-\frac {1}{12 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {1}{8 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}-\frac {3}{32 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}}{a^{3} d}\) | \(190\) |
norman | \(\frac {-\frac {64 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{7 a d}+\frac {16}{63 a d}+\frac {32 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{21 a d}+\frac {208 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{63 a d}+\frac {128 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{63 a d}-\frac {80 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}-\frac {544 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{63 a d}-\frac {32 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 a d}-\frac {368 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{21 a d}}{a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{9} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\) | \(205\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 382 vs.
\(2 (97) = 194\).
time = 0.32, size = 382, normalized size = 3.64 \begin {gather*} -\frac {16 \, {\left (\frac {6 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {12 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {27 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {36 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {42 \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + 1\right )}}{63 \, {\left (a^{3} + \frac {6 \, a^{3} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {12 \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {2 \, a^{3} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - \frac {27 \, a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {36 \, a^{3} \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + \frac {36 \, a^{3} \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}} + \frac {27 \, a^{3} \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}} - \frac {2 \, a^{3} \sin \left (d x + c\right )^{9}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{9}} - \frac {12 \, a^{3} \sin \left (d x + c\right )^{10}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{10}} - \frac {6 \, a^{3} \sin \left (d x + c\right )^{11}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{11}} - \frac {a^{3} \sin \left (d x + c\right )^{12}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{12}}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 128, normalized size = 1.22 \begin {gather*} \frac {\cos \left (d x + c\right )^{6} - 36 \, \cos \left (d x + c\right )^{4} + 57 \, \cos \left (d x + c\right )^{2} - {\left (3 \, \cos \left (d x + c\right )^{4} - 34 \, \cos \left (d x + c\right )^{2} + 7\right )} \sin \left (d x + c\right ) - 14}{63 \, {\left (3 \, a^{3} d \cos \left (d x + c\right )^{5} - 4 \, a^{3} d \cos \left (d x + c\right )^{3} + {\left (a^{3} d \cos \left (d x + c\right )^{5} - 4 \, a^{3} d \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.63, size = 172, normalized size = 1.64 \begin {gather*} \frac {\frac {21 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 24 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 11\right )}}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{3}} - \frac {189 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{8} + 1764 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 7224 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 16380 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 19026 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 16380 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 8352 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2340 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 281}{a^{3} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}^{9}}}{2016 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 13.19, size = 208, normalized size = 1.98 \begin {gather*} -\frac {\frac {16\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}}{63}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}+\frac {64\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{21}+\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{63}-\frac {48\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{7}-\frac {64\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{7}-\frac {32\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{3}}{a^3\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^3\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^9} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________